package com.spring.pick2pick.model;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;


public class FileInfo {

	private String fieldName;
	private int idImage;
	private String fileOrgName;
	private String fileSaveName;
	private String fileDir;
	private long fileSize;
	private String fileType;
	private int sortKey;
	private int isDisplay;
	private String regDate;
	private String editDate;
	
	/*public FileInfo(String fieldName, String fileOrgName,
			String fileSaveName, String fileDir, long fileSize,
			String fileType) {
		super();
		this.fieldName = fieldName;
		this.fileOrgName = fileOrgName;
		this.fileSaveName = fileSaveName;
		this.fileDir = fileDir;
		this.fileSize = fileSize;
		this.fileType = fileType;
	}
	
	public FileInfo(int idImage, String fileOrgName,
			String fileSaveName, String fileDir, long fileSize,
			String fileType) {
		super();
		this.idImage = idImage;
		this.fileOrgName = fileOrgName;
		this.fileSaveName = fileSaveName;
		this.fileDir = fileDir;
		this.fileSize = fileSize;
		this.fileType = fileType;
	}
	
	public FileInfo(String fieldName, int idImage, String fileOrgName,
			String fileSaveName, String fileDir, long fileSize,
			String fileType) {
		super();
		this.fieldName = fieldName;
		this.idImage = idImage;
		this.fileOrgName = fileOrgName;
		this.fileSaveName = fileSaveName;
		this.fileDir = fileDir;
		this.fileSize = fileSize;
		this.fileType = fileType;
	}
	
	public FileInfo(String fieldName, int idImage, String fileOrgName,
			String fileSaveName, String fileDir, long fileSize,
			String fileType, int sortKey) {
		super();
		this.fieldName = fieldName;
		this.idImage = idImage;
		this.fileOrgName = fileOrgName;
		this.fileSaveName = fileSaveName;
		this.fileDir = fileDir;
		this.fileSize = fileSize;
		this.fileType = fileType;
		this.sortKey = sortKey;
	}

	public FileInfo(String fieldName, int idImage, String fileOrgName, String fileSaveName,
			String fileDir, long fileSize, String fileType, int sortKey,
			int isDisplay, String regDate, String editDate) {
		super();
		this.fieldName = fieldName;
		this.idImage = idImage;
		this.fileOrgName = fileOrgName;
		this.fileSaveName = fileSaveName;
		this.fileDir = fileDir;
		this.fileSize = fileSize;
		this.fileType = fileType;
		this.sortKey = sortKey;
		this.isDisplay = isDisplay;
		this.regDate = regDate;
		this.editDate = editDate;
	}*/

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

	public int getIdImage() {
		return idImage;
	}

	public void setIdImage(int idImage) {
		this.idImage = idImage;
	}

	public String getFileOrgName() {
		return fileOrgName;
	}

	public void setFileOrgName(String fileOrgName) {
		this.fileOrgName = fileOrgName;
	}

	public String getFileSaveName() {
		return fileSaveName;
	}

	public void setFileSaveName(String fileSaveName) {
		this.fileSaveName = fileSaveName;
	}

	public String getFileDir() {
		return fileDir;
	}

	public void setFileDir(String fileDir) {
		this.fileDir = fileDir;
	}

	public long getFileSize() {
		return fileSize;
	}

	public void setFileSize(long fileSize) {
		this.fileSize = fileSize;
	}

	public String getFileType() {
		return fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}

	public int getSortKey() {
		return sortKey;
	}

	public void setSortKey(int sortKey) {
		this.sortKey = sortKey;
	}

	public int getIsDisplay() {
		return isDisplay;
	}

	public void setIsDisplay(int isDisplay) {
		this.isDisplay = isDisplay;
	}

	public String getRegDate() {
		return regDate;
	}

	public void setRegDate(String regDate) {
		this.regDate = regDate;
	}

	public String getEditDate() {
		return editDate;
	}

	public void setEditDate(String editDate) {
		this.editDate = editDate;
	}
	
	public String toString() {
		String params = null;
		
		try {
			params = "fileOrgName=" + URLEncoder.encode(fileOrgName, "UTF-8")
					+ "&fileSaveName=" + URLEncoder.encode(fileSaveName, "UTF-8")
					+ "&fileDir=" + URLEncoder.encode(fileDir, "UTF-8")
					+ "&fileSize=" + fileSize
					+ "&fileType=" + URLEncoder.encode(fileType, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		
		return params;
	}/*

	public String toString(String encType) {
		String params = null;
		
		try {
			params = "fieldName=" + URLEncoder.encode(fieldName, encType)
					+ "&fileOrgName=" + URLEncoder.encode(fileOrgName, encType)
					+ "&fileSaveName=" + URLEncoder.encode(fileSaveName, encType)
					+ "&fileDir=" + URLEncoder.encode(fileDir, encType)
					+ "&fileSize=" + fileSize
					+ "&fileType=" + URLEncoder.encode(fileType, encType);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		
		return params;
	}*/

}
